package com.dc.base.exception;

public class BusinessException extends Exception {
    // private static Logger logger = Logger.getLogger(BusinessException.class);

    private int code;
    private String message;

    public BusinessException(String message) {
        super(message);
        this.message = message;
    }

    public BusinessException(int code, String message) {
        super(message);
        this.message = message;
        this.code = code;
    }

    public BusinessException(String message, Exception ex) {
        super(message);
        this.message = message;
        // logger.error(message+" | "+ex.getMessage(),ex);
    }

    public BusinessException(String msg1, String msg2, Exception ex) {
        new BusinessException(msg1 + " | " + msg2, ex);
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }


}
